load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

package(default_visibility = ["//visibility:public"])

cc_binary(
    name = "libcomponent_usecase.so",
    linkshared = True,
    linkstatic = False,
    deps = [":component_usecase_lib"],
)

cc_library(
    name = "component_usecase_lib",
    srcs = [
        "component_usecase.cc",
    ],
    hdrs = [
        "component_usecase.h",
    ],
    deps = [
        "//air_service/modules/perception-usecase/usecase/base:runner",
        "//air_service/modules/perception-usecase/usecase/base:config_manager",
        "//air_service/modules/perception-usecase/usecase/common:timer",
        "//air_service/modules/perception-usecase/usecase/common:factory",
        "//air_service/modules/perception-usecase/usecase/common:util",
        "//air_service/modules/perception-usecase/usecase/common:math",
        "//air_service/modules/perception-usecase/proto:roi_lane_cc_pb",
        "//air_service/modules/perception-usecase/usecase/algorithm:lane_congestion",
        "//air_service/modules/perception-usecase/usecase/algorithm:params",
        "//air_service/modules/perception-usecase/usecase/map:map_info",
        "//base/io:base_io",
        "@airosrt//:airosrt",
        "@com_github_gflags_gflags//:gflags",
        "@fastrtps//:fastrtps",
        "@protobuf_import//:protobuf_import",
        "@yaml_cpp//:yaml_cpp",
    ],
    alwayslink = True,
)


cc_binary(
    name = "libcomponent_usecase_viz.so",
    linkshared = True,
    linkstatic = False,
    deps = [ ":component_usecase_viz_lib"],
)

cc_library(
    name = "component_usecase_viz_lib",
    defines = ["USE_VIZ"],
    srcs = [
        "component_usecase.cc",
    ],
    hdrs = [
        "component_usecase.h",
    ],
    deps = [
        "//air_service/modules/perception-usecase/usecase/base:runner",
        "//air_service/modules/perception-usecase/usecase/base:config_manager",
        "//air_service/modules/perception-usecase/usecase/common:timer",
        "//air_service/modules/perception-usecase/usecase/common:factory",
        "//air_service/modules/perception-usecase/usecase/common:util",
        "//air_service/modules/perception-usecase/usecase/common:math",
        "//air_service/modules/perception-usecase/proto:roi_lane_cc_pb",
        "//air_service/modules/perception-usecase/usecase/algorithm:lane_congestion",
        "//air_service/modules/perception-usecase/usecase/algorithm:params",
        "//air_service/modules/perception-usecase/usecase/map:map_info",
        "//air_service/modules/perception-usecase/visualization:visualization_internal",
        "//base/io:base_io",
        "@airosrt//:airosrt",
        "@com_github_gflags_gflags//:gflags",
        "@protobuf_import//:protobuf_import",
        "@yaml_cpp//:yaml_cpp",
    ],
    alwayslink = True,
)